Skip to content

Only compile the iOS app delegate for Qt 5 - #3988

Open
ann0see wants to merge 1 commit into
jamulussoftware:mainfrom
ann0see:ios/fix-qt6-app-delegate
Open

ann0see wants to merge 1 commit into
jamulussoftware:mainfrom
ann0see:ios/fix-qt6-app-delegate

Conversation

@ann0see

@ann0see ann0see commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Short description of changes

Only compile src/ios/ios_app_delegate.mm for Qt 5.

That file defines a second QIOSApplicationDelegate. Qt 6 ships its own implementation, which provides the UIScene lifecycle adoption required since iOS 26; the duplicate definition shadows those methods and the app aborts on launch with:

Application failed to launch: UIScene life cycle is required for apps built with this SDK.

followed by SIGTRAP in -[UIApplication workspace:didCreateScene:withTransitionContext:completion:]. With the file compiled only for Qt 5 the app launches normally.

CHANGELOG: iOS: Fixed the app aborting on launch when built with Qt 6.

Context: Fixes an issue?

Relates to #3406 (Qt 6 iOS compatibility). There is no issue for the abort itself.

Does this change need documentation? What needs to be documented and how?

No.

Status of this Pull Request

Working implementation, verified locally.

What is missing until this pull request can be merged?

  • Tested on simulators only (Xcode 27 / iOS 27.2) and on iPhone with iOS 27.0.1
  • Qt 5 builds are unchanged, but they should be smoke-tested as well. We need to bump up to Qt6 anyway, as otherwise the app crashes with the latest SDK.

Checklist

  • I've verified that this Pull Request follows the general code principles
  • I tested my code and it does what I want
  • My code follows the style guide
  • I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • I've filled all the content above

AUTOBUILD: Please build all targets

🤖 Used AI: DeepSeek V4.1 Flash, OpenCode

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The iOS project now includes ios_app_delegate.mm and ios_app_delegate.h only when QT_MAJOR_VERSION is below 6.

Changes: iOS build configuration

Layer / File(s) Summary
Select iOS delegate files by Qt version
Jamulus.pro
The project includes the custom iOS application delegate source and header only for Qt versions below 6.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Possibly related issues

Suggested labels: bug

Merge Risk: Minimal · up to 71500

The change selects the iOS delegate by Qt version. No merge-blocking risk is identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title clearly summarizes the main change: compile the iOS app delegate only for Qt 5.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description follows the repository template and fills in the main sections. It states the change: the iOS app delegate is compiled only for Qt 5, which stops a duplicate QIOSApplicationDelegate fr…
Full details: Description check

Explanation

The description follows the repository template and fills in the main sections. It states the change: the iOS app delegate is compiled only for Qt 5, which stops a duplicate QIOSApplicationDelegate from blocking the UIScene lifecycle on Qt 6 and stops the launch abort. It gives a CHANGELOG entry, links related issue #3406 and says no issue exists for the abort itself, answers the documentation question with No, gives the status as a working implementation verified locally, and lists the remaining testing. Checklist items are ticked. Minor gaps: the Context section does not say the change fixes an issue directly, and the Status section does not state the reviewer-facing merge blockers in full. These gaps are non-critical.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: 96f5632d-4a97-499b-bace-73e8dabe9b4e
Commits

Reviewing files that changed from the base of the PR and between 4baa1c9 and 715000e.

Files selected for processing: 1

  • Jamulus.pro

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

Comment thread Jamulus.pro Resolved
@ann0see

ann0see commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

Built the latest release tag (r3_12_6) for the iOS simulator against Qt 6.11.1:

  • unmodified tag: aborts on launch, EXC_BREAKPOINT/SIGTRAP in ___UIApplicationEvaluateRuntimeIssueForNoSceneLifecycleAdoption_block_invoke with Application failed to launch: UIScene life cycle is required for apps built with this SDK.
  • same tree with only this change applied: launches, stays running, renders the main window and reaches the microphone permission prompt.

Together with #3987 and #3989 this is what lets iOS move to Qt 6, so an iOS release (3.12.6 or 3.12.7, maintainers' call) depends on it.

🤖 Used AI: DeepSeek V4.1 Flash, OpenCode

@ann0see ann0see added the AI AI generated or potentially AI generated label Nov 9, 2026
@ann0see
ann0see requested review from pljones and softins November 9, 2026 18:55
@ann0see

ann0see commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

Verified beyond the launch abort: a development-signed build runs on an iPhone 15 Pro (iOS 27.0.1) and in the iPhone 17, iPad Pro and Apple Vision Pro simulators (the iPad build runs in "Designed for iPad" mode on visionOS). Without this change the release tag aborts, as noted above.

Not ready for a TestFlight upload yet, independently of this PR:

  • no privacy manifest in the repository or in the built bundle (find . -name '*.xcprivacy' returns nothing). Qt uses required-reason APIs (file timestamps, UserDefaults, disk space), so App Store Connect raises ITMS-91053.
  • r3_12_6 ships CFBundleShortVersionString = 1.0 and CFBundleVersion = 1.
  • only development signing has been exercised; a distribution profile plus xcodebuild archive / -exportArchive is untested.

Separate distribution question: the iOS build statically links Qt 6.11.1 and Qt's FFmpeg, so the LGPL relink obligation needs a decision before a public release.

🤖 Used AI: DeepSeek V4.1 Flash, OpenCode

@ann0see

ann0see commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

On the LGPL thing, I hope we're fine as iOS is special anyway. Also it's already published anyway. the xcprivacy one is nice to have but we already set it manually on AppStore connect.

CFBundleShortVersionString = 1.0 and CFBundleVersion = 1 currently manually updated before each release...

@ann0see ann0see added this to Tracking Nov 9, 2026
@github-project-automation github-project-automation Bot moved this to Triage in Tracking Nov 9, 2026
@ann0see ann0see added this to the Release 3.12.6 milestone Nov 9, 2026
@ann0see ann0see moved this from Triage to Waiting on Team in Tracking Nov 9, 2026
src/ios/ios_app_delegate.mm defines a second QIOSApplicationDelegate which
shadows Qt 6's own implementation. Qt 6 provides the UIScene lifecycle
adoption required since iOS 26; with the duplicate implementation the app
aborts on launch with:

    Application failed to launch: UIScene life cycle is required for apps
    built with this SDK

(QTBUG/SIGTRAP from -[UIApplication workspace:didCreateScene:...]).
@ann0see
ann0see force-pushed the ios/fix-qt6-app-delegate branch from 4baa1c9 to 715000e Compare November 9, 2026 21:00
@ann0see

ann0see commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

I'd like to get this into a release for iOS as we need to move to Qt6 asap. Together with the chat window fix, I believe it should be mostly fine. There could still be some minor UI issues e.g. the feedback message but otherwise I suppose we could release iOS on Qt6 on the next release.

@ann0see ann0see added the iOS iOS runtime issue label Nov 9, 2026

@softins softins left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sensible to me. I'll be happy to test it when it is on TestFlight, as I now have an iPad with iPadOS 26.

@ann0see

ann0see commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

Great. I'd like to have the chat window fix in too.

@ann0see

ann0see commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

And it works on my phone too. So hardware is definitely tested.

@pljones pljones added the backport_required A change to main that needs fix on an existing release. label Nov 14, 2026
@pljones pljones modified the milestones: Release 3.12.6, Release 4.0.0 Nov 14, 2026
mcfnord pushed a commit to mcfnord/jamulus that referenced this pull request Nov 14, 2026
…e#3988 combo, grant mic, idb

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01189Juyu5SViHMRVmVATSJv
@ann0see

ann0see commented Nov 14, 2026 •

Copy link
Copy Markdown
Member Author

@pljones I tagged it for 3.12.6 as it seems to be a blocker for an app store release of current stable with the Xcode 27 SDK. Qt5 does not work reliably, so we should bump to Qt6.

@pljones

pljones commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

As I've mentioned before:

  • the target release MUST be 4.0.0 if this is going into r4_0_0 - i.e. being merged to main in the PR
  • the PR gets labelled backport_required, which puts it onto the right tab of the board: Tracking (view)
  • once the PR is marked "Done", the backport to release/3_12 is made, the Milestone changed to the 3.12 current release and the backport_required label removed

(Once the target 3.12 milestone is released, the board view filter and title get bumped.)

@ann0see

ann0see commented Nov 15, 2026

Copy link
Copy Markdown
Member Author

Hmm ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI AI generated or potentially AI generated backport_required A change to main that needs fix on an existing release. iOS iOS runtime issue

Projects

Status: Waiting on Team

Development

Successfully merging this pull request may close these issues.

3 participants